﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:pieSlice="clr-namespace:WpfChartingControlLibrary.PieChart">


    <Style TargetType="{x:Type pieSlice:PieSlice}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}" Focusable="True">
                        <VisualStateManager.VisualStateGroups>
                            <!--<VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.1" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="MouseOverHighlight" Storyboard.TargetProperty="Opacity" To="0.6" Duration="0" />
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="MouseOverHighlight" Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)">
                                            <LinearColorKeyFrame KeyTime="0:0:0.10" Value="Black"/>
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.1" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Unselected" />
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="SelectionHighlight" Storyboard.TargetProperty="Opacity" To="0.6" Duration="0" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>-->
                            <VisualStateGroup x:Name="RevealStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.50" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Shown">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Hidden">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity" To="0" Duration="0" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>




                        <Grid x:Name="Root" Opacity="0" Effect="{Binding PieSliceEffect, RelativeSource={RelativeSource TemplatedParent}}">
                            <Path StrokeMiterLimit="1" Data="{Binding Geometry , RelativeSource={RelativeSource TemplatedParent}}" Fill="{Binding Fill , RelativeSource={RelativeSource TemplatedParent}}" x:Name="dddd"/>
                            <Path x:Name="SelectionHighlight" StrokeMiterLimit="1" Data="{Binding Geometry , RelativeSource={RelativeSource TemplatedParent}}" Fill="Red" IsHitTestVisible="False" Opacity="0"/>
                            <Path x:Name="MouseOverHighlight" StrokeMiterLimit="1" Data="{Binding Geometry , RelativeSource={RelativeSource TemplatedParent}}" Fill="White" IsHitTestVisible="False" Opacity="0">
                                <Path.Stroke>
                                    <SolidColorBrush></SolidColorBrush>
                                </Path.Stroke>
                            </Path>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


</ResourceDictionary>